<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>文章回收站</title>
<style type="text/css">
<!--
*{margin:0;padding:0;list-style:none;}
body,html{height:97%;}
body{background-color: #ffffff;}
#left_tree{float:left;width:175px;height:100%;border:1px solid #ccc;background:#ffffff;overflow:auto;padding:10px;}
#right_main{float:left;width:94%;height:100%;border:1px solid #ccc;background:#ffffff;padding:10px;}
#right_top{ border:0px solid #c1dcee;height:30px;padding:5px;vertical-align:middle;line-height:30px;}

ul li{ vertical-align: middle; line-height: 20px;}
.ul_tree li{width:98%;min-width:175px;dispaly:inline;white-space:nowrap;font-size:13px;	font-family:'宋体';height:20px;cursor:pointer;}
.ul_tree li img{vertical-align: middle;}
.on_li{font-size:13px;font-family:'宋体';vertical-align:middle;	line-height:20px;height:20px;cursor:pointer;font-weight: bold;color:red;font-style: italic;}
.ul_tree_node li{width:auto !important;min-width:175px;dispaly:inline-block;display:-moz-inline-box; white-space:nowrap; font-size:13px;height:20px;cursor:pointer;}
.ul_tree_node li img{vertical-align: middle;margin-top:0px;}

.tools{margin: 5px; font-style: normal; font-size: 14px; height:25px;}
.tools{text-decoration: none;height: 24px;margin: 0 5px 0 0;background: url('${rc.contextPath}/images/btnout_bg_left.gif') no-repeat left center;float: left;_display: inline;-moz-user-select:none;}
.tools img {margin: 2px 0px 4px 4px;_display: inline;float: left; border: 0px;}
.tools b {cursor:pointer;	white-space: nowrap;color: #666;font-weight: normal;height: 24px;padding:0 3px 0 3px;line-height: 24px;background: url('${rc.contextPath}/images/btnout_bg_right.gif') no-repeat right center;display:inline-block;+zoom: 1;+display: inline;}
.tools:hover {text-decoration: none;background: url('${rc.contextPath}/images/btnover_bg_left.gif') no-repeat left center;}
.tools:hover b {color: #147;background: url('${rc.contextPath}/images/btnover_bg_right.gif') no-repeat right center;}

.table{border-collapse:collapse;border:none;}
.table td{border:solid #c1dcee 1px;  font-size:15px;padding:3px;}
.trHead td{text-align:center;height:22px;background-image: url('${rc.contextPath}/images/td_bg.png');background-repeat: repeat-x;}

.tr td{font-size:13px;text-align:center;}
.tr:hover{background-color: #D8F79D}

.page_control{ padding:10px 5px;width:100%;height:auto !important;height:10px;}
.page_control a{ padding:0 5px; text-decoration:none;margin-right:5px;background-color:#CCC;color:#4164F1;}
.page_control a:hover{ text-decoration:none;margin-right:5px;background-color:#add2da;color:#fff;}
.page_control .on{ text-decoration:none; background-color: #136DA9;color:#fff;}
.f_l{ float:left; font-size:15px; color:#176193}
.f_r{ float:right;font-size:15px; color:#176193}

.select_web{width:150px;font-size:14px;color:#5E5E5E}

.site_result{display: inline-block;width: 100%;height:28px;font-size:12px;font-weight:bold; vertical-align:middle;line-height:28px; border:0px; overflow: hidden;white-space: nowrap; text-overflow: ellipsis; cursor:pointer;}
.site_result:hover{background: #ccc;}

-->
</style>
</head>
<body>
<table border="0" width="100%" height="100%">
	<tr>
		<td style="height:100%;width:15%">
		<%-- 所有栏目区 --%>
		<div id="left_tree"></div>
		</td>
		<td style="height:100%">
		<div id="right_main">
			<%-- 按钮区 --%>
			<div id="right_top">
				<span style="margin-right: 5px; font-style: normal; font-size: 14px; height:25px;float:left;" >
					选择站点：<select id="select_web" onchange="loadTcolunmSource(this,false)" class="select_web"></select>
					<input type="text" id="_siteName_web" onkeyup="extendArticle.addDivPanel(this,'loadTcolunmSource(this,true)')" onblur="extendArticle.delDivPanel()"  style="margin-left:-157px;font-size:14px; position: relative;width:130px;"/>
				</span>
				
				<form id="recyclebinArticle_form" action="recyclebinSource" method="post">
					<input type="hidden" name="start" id="start" value="0" />
					<input type="hidden" name="limit" id="limit" value="10" />
					<span style="font-size:14px;float:left;">创建时间：
						<input type="text" name="faddtime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',realFullFmt:'%Date'})" class="Wdate"/>至
						<input type="text" name="fupdatetime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',realFullFmt:'%Date'})" class="Wdate"/>
					</span>
					<a href="javascript:void(0)" onclick="queryRecycleBinSource()"  class="tools" style="margin-top:3px;"><img  src="${rc.contextPath }/images/gif_45_090.gif" /><b>查询</b></a>
					<a href="javascript:void(0)" onclick="deleteArticleById()" class="tools" style="margin-top:3px;"><img  src="${rc.contextPath }/images/icon002a3.gif" /><b>删除</b></a>	
					<a href="javascript:void(0)" onclick="reductionArticle()" class="tools" style="margin-top:3px;"><img  src="${rc.contextPath }/images/gif_45_085.gif" /><b>还原</b></a>
				</form>
			</div>
			<font style="padding:3px;color:#225F88;font-size:15px;">文章列表</font>
			
			<table class="table" align="center" width="100%">
				<thead>
					<tr class="trHead">
						<td width="5%"><input type="checkbox" id="allCk" onclick="ckCheckbox(this)" /></td>
						<td width="5%">编号</td>
						<td width="35%">标题</td>
						<td width="10%">类型</td>
						<td width="10%">分类</td>
						<td width="10%">人气</td>
						<td width="10%">创建人</td>
						<td width="15%">创建时间</td>
					</tr>
				</thead>
				<tbody id="dataGrid">
				</tbody>
			</table>
			
				<div class="page_control">
					<span class="f_l" id="totalCount"></span>
					<span class="f_r" id ='pagePanel'></span>
				</div>
		</div>
		</td>
	</tr>
</table>

<!-- web panner -->
<div id="_dPanel" style="width:160px;height:auto !important;min-height:50px;background: #ffffff;z-index: 811215;border:1px solid #ccc;position: absolute;">
</div>
<script type="text/javascript" src="${rc.contextPath }/js/jquery/jquery-1.8.2.js"></script>
<script type="text/javascript" src="${rc.contextPath }/js/jquery/jquery.form.js"></script>
<script type="text/javascript" src="${rc.contextPath }/js/jquery/jquery.blockUI.js" charset="utf-8"></script>
<script type="text/javascript" src="${rc.contextPath }/js/datepicker/WdatePicker.js" charset="utf-8"></script>
<script type="text/javascript" src="${rc.contextPath }/js/article/recyclebin.js" ></script>
<script type="text/javascript" src="${rc.contextPath}/js/article/article.plugins.js" ></script>
<script type="text/javascript" src="${rc.contextPath}/js/page.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
	loadWebsiteInfoSource();
});
//加载网站数据
function loadWebsiteInfoSource(){
	$.ajax({
		url:'websiteinfoSource',
		type:'post',
		dataType:'json',
		success:function(data){
			var html = '<option value="" disabled="disabled" selected="selected">----站点列表----</option>',sHtml = '';
			$.each(data,function(i,u){
				html += '<option value="'+u.id+'">'+u.ftitle+'</option>';
				sHtml += '<span class="site_result" id="'+u.id+'">' +u.ftitle+ '</span>';
			});
			$("#select_web").html(html);
			$("#_dPanel").html(sHtml);
			$("#_dPanel").hide();
		},
		error:function(msg){
			$.growlUI('网站数据加载出错');
		}
	});
}
///加载所有栏目数据
function loadTcolunmSource(obj,isSelect){
	
	if(isSelect)
		$("#_siteName_web").val(obj.innerHTML);
	
	_waiting._show();
	$.ajax({
		url:'tcolunmSource',
		type:'post',
		data:{'webid':isSelect?obj.id:obj.value,'check':'delete','type':0},
		dataType:'json',
		success:function(data){
			_articleCount = 0;
			$("#left_tree").html($.fn.simpleTree(data,'${rc.contextPath}',false,isSelect?obj.innerHTML:obj.options[obj.selectedIndex].text));
			$("#website_ArticleCont").html('('+ _articleCount +')');
			_waiting._hide();
		},
		error:function(msg){
			$.growlUI('栏目加载出错');
			_waiting._hide();
		}
	});
}
</script>
</body>
</html>